// 静态路由
const Routers = [
  {
    path: '/',
    redirect: '/linkstart',
    component: () => import('@/components/Template/index.vue'),
    children: [
      {
        path: '/linkstart',
        name: 'linkstart',
        component: () => import('@/views/Linkstart.vue'),
        meta: { title: '首页' }
      },
      {
        path: '/fantasyland',
        name: 'fantasyland',
        component: () => import('@/views/user/Fantasyland.vue'),
        meta: { title: '动漫' },
      },
      {
        path: '/comic',
        name: 'comic',
        redirect: '/haven',
        component: () => import('@/components/Template/Haven/index.vue'),
        meta: { title: '漫画' },
        children: [
          {
            path: '/haven',
            name: 'haven',
            component: () => import('@/views/user/Haven.vue'),
            meta: { title: '漫画主页' }
          },
          {
            path: '/classification',
            name: 'classification',
            component: () => import('@/views/user/details/comic/Classification.vue'),
            meta: { title: '分类页面' }
          },
        ]
      },
      {
        path: '/euphoria',
        name: 'euphoria',
        component: () => import('@/views/user/Euphoria.vue'),
        meta: { title: 'galgame' },
      },
      {
        path: '/forum',
        name: 'forum',
        redirect: '/forum/spam',
        component: () => import('@/views/user/Forum.vue'),
        meta: { title: '茶话室' },
        children: [
          {
            path: '/forum/spam',
            name: 'spam',
            component: () => import('@/views/user/details/forum/spam.vue'),
            meta: { title: '水贴室'}
          },
          {
            path: '/forum/anime',
            name: 'forumanime',
            component: () => import('@/views/user/details/forum/anime.vue'),
            meta: { title: '动漫交流中心'}
          },
          {
            path: '/forum/comic',
            name: 'forumcomic',
            component: () => import('@/views/user/details/forum/comic.vue'),
            meta: { title: '漫画交流中心'}
          },
          {
            path: '/forum/games',
            name: 'forumgames',
            component: () => import('@/views/user/details/forum/games.vue'),
            meta: { title: 'galgame交流中心'}
          },
          {
            path: '/forum/article',
            name: 'article',
            component: () => import('@/views/user/details/forum/index.vue'),
            meta: { title: '文章内容' }
          }
        ]
      },
      {
        path: '/aboutus',
        name: 'aboutus',
        component: () => import('@/views/user/AboutUs.vue'),
        meta: { title: '关于我们' }
      },
    ]
  },
  {
    path: '/readme',
    name: 'readme',
    component: () => import('@/views/user/ReadMe.vue'),
    meta: { title: '网站申明' }
  },
  {
    path: '/search',
    name: 'search',
    component: () => import('@/views/user/Search.vue'),
    meta: { title: '搜索页面' }
  },
  {
    path: '/space',
    name: 'space',
    redirect: '/space/belike',
    component: () => import('@/views/user/Space.vue'),
    meta: { requiresAuth: true, title: '个人主页' },
    children: [
      {
        path: '/space/belike',
        name: 'belike',
        component: () => import('@/components/Template/Space/belike/index.vue'),
        meta: { title: '喜欢' },
      },
      {
        path: '/space/information',
        name: 'information',
        component: () => import('@/components/Template/Space/information/index.vue'),
        meta: { title: '个人信息' },
      },
      {
        path: '/space/setting',
        name: 'setting',
        component: () => import('@/components/Template/Space/setting/index.vue'),
        meta: { title: '设置' },
      }
    ]
  },
  {
    path: '/fantasyland/details',
    name: 'fantasylandDetails',
    component: () => import('@/views/user/details/anime/index.vue'),
    meta: { requiresAuth: true, title: '动漫详情页' }
  },
  {
    path: '/euphoria/details',
    name: 'euphoriaDetails',
    component: () => import('@/views/user/details/games/index.vue'),
    meta: { requiresAuth: true, title: 'galgame详情页' }
  },
  {
    path: '/haven/details',
    name: 'havenDetails',
    component: () => import('@/views/user/details/comic/index.vue'),
    meta: { requiresAuth: true, title: '漫画详情页' }
  },
  {
    path: '/envelope',
    name: 'envelope',
    component: () => import('@/views/user/envelope.vue'),
    meta: { requiresAuth: true, title: '邮箱' }
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('@/views/login/index.vue'),
    meta: { title: '登录' }
  },
  {
    path: '/403',
    name: 'Forbidden',
    component: () => import('@/views/error/Forbidden.vue'),
    meta: { title: '403' }
  },
  {
    path: '/404',
    name: 'NotFound',
    component: () => import('@/views/error/NotFound.vue'),
    meta: { title: '404' }
  },
  {
    path: '/:catchAll(.*)',
    redirect: '/404'
  }
]

export default Routers;
